package exer;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.PriorityQueue;

/**
 * @author tongchen
 * @create 2022-11-05 20:31
 */
public class PriorityQueueTest {
    public static void main(String[] args) {
        PriorityQueue<Integer>priorityQueue=new PriorityQueue<>();
        priorityQueue.offer(1);
        priorityQueue.offer(2);
        priorityQueue.offer(3);
        priorityQueue.offer(5);
        priorityQueue.offer(4);
        priorityQueue.poll();
        System.out.println("***************************");
        ArrayList<Integer> list = new ArrayList<>();
        list.add(1);
        list.add(2);
        list.add(3);
        list.add(4);
        PriorityQueue<Integer>priorityQueue1=new PriorityQueue<>(list);
        System.out.println("***************************");
        PriorityQueue<Student>priorityQueue2=new PriorityQueue<>();
        Student student1 = new Student("张三", 10, 96.00);
        Student student2 = new Student("李四", 11, 97.00);
        Student student3 = new Student("王五", 12, 98.00);
        priorityQueue2.add(student1);
        priorityQueue2.add(student2);
        priorityQueue2.add(student3);
        ComparWithScore comparWithScore = new ComparWithScore();
        Object o = new Object(){
            public boolean equals(Object o1){
                return true;
            }
        };
        PriorityQueue<Student>priorityQueue3=new PriorityQueue<>(comparWithScore);


    }
}
